<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
       
        <!--@.stop解决点击冒泡事件-->
        <div @click="divclick">
            <p>点击冒泡事件</p>
        <button @click.stop="butclick">按钮</button>
         </div>
    </div>
    <script>

        var app=new Vue({
             el:'#app',
             methods:{
                butclick:function(){
                     console.log("button bit");
                 },
                 divclick:function(){
                    console.log("div bit");
                 }
             }
    
        });
    </script>
</body>
</html>